<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<script>
    var age = 17;
    if(age >= 18){
        console.info("已经成年");
    }else{
        console.info("未成年");
    }


   var score = 50;
    if(score>=90 && score<=100){
        console.info("优秀");
    }else if(score>=80 && score<=90){
        console.info("良好");
    }else if(score>=70 && score<=80){
        console.info("中等");
    }else if(score>=60 && score<=70){
        console.info("及格");
    }else{
        console.info("不及格");
    }


var grade = 95;
 if(grade >= 90){
	console.log("该成绩的等级为优 ");
}else if(grade >= 80){
	console.log("该成绩的等级为良 ");
}else if(grade >= 70){
	console.log("该成绩的等级为中 ");
}else if(grade >= 60){
	console.log("该成绩的等级为及格 ");
}else{
	console.log("该成绩的等级为不及格 ");
}


var score = parseInt(prompt("请输入一个判定成绩："));
	switch(Math.trunc(score/10)){
		case 9:
		case 10: console.log("优");	break;
		case 8: console.log("良");	break;
		case 7: console.log("中");	break;
		case 6: console.log("及格");break;
		default:console.log("差");
	}

</script>
<body>

</body>
</html>